﻿using ConfExpert.Forms.Base;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

using DevTeam;

namespace ConfExpert.Forms.Depo.Kauf
{
    public partial class ModelhaneTumIstekler : XForm
    {
        public int SecilenCustomerId { get; set; }
        public ModelhaneTumIstekler()
        {
            InitializeComponent();
        }

        private void ModelhaneTumIstekler_Load(object sender, EventArgs e)
        {
            this.Text = "Modelhane Tüm İstekler";

            gridView1.Init("GetModelhaneTumIstekler");
            gridView1.MakeColumnsReadOnly("CustomerId", "Adet");
            gridView1.DoubleClick += gridView1_DoubleClick;
            gridView1.BestFitColumns();
        }

        void gridView1_DoubleClick(object sender, EventArgs e)
        {
            Console.WriteLine("Cift Tik");
            SecilenCustomerId = gridView1.GetSelectedValues("CustomerId").ToInt();
            this.DialogResult = System.Windows.Forms.DialogResult.OK;
        }
    }
}
